// ManaTest project main.go
package main

import (
	_ "fmt"
	"mana/stream"
	"mana/buyer"
	"mana/json"
	"mana/net"
)

func main() {
	println("start")
	s := new(stream.Streamer)
	j := json.JsonReader(s, "")
	for _, v := range j {
		result, _ := net.PostForm(v.Url, v.ToURLValues())
		resultmap := v.JsonDecoder(result)
		v.AssignTester(resultmap, "Receive")

		v.Result = buyer.CheckResult(v.Response, v.Receive)
		v.ToString()
		dat, _ := v.JsonEncoder(v.Tester)
		json.JsonWriter(s, *v, dat)
		s.Writer(v.GetAbsolutePath()+"\\result\\"+v.Name+".result.json", result)
	}

	println("end")

}
